<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{:C('site_name')}></title>
<meta name="keywords" content="<{:C('keyword')}>" />
<meta name="description" content="<{:C('content')}>" />
<link rel="stylesheet" href="<{:STATICS}>/css/bootstrap.min.css" type="text/css" media="all" />
<link rel="stylesheet" href="<{:RES}>/css/admin.css" type="text/css"/>
<link rel="stylesheet" href="<{:STATICS}>/css/jquery-ui.min.css" type="text/css" media="all" />
</head>
<script type="text/javascript" src="<{:STATICS}>/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/jquery.artDialog.js?skin=aero"></script>
<script type="text/javascript" src="<{:STATICS}>/js/iframeTools.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/jquery.form.min.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/datepicker.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	//ajaxform
	var options = { 
		beforeSubmit:showRequest,//表单验证方式
        success:showResponse  // post-submit callback 
    }; 

    $('#ajaxForm').ajaxForm(options); 

    function showResponse(responseText, statusText)  {

		if (statusText == 'success') {
			var responseText=eval('('+responseText+')');
			if(responseText.state == 'SUCCESS'){
				var origin = artDialog.open.origin;
				origin.location.reload();
				setTimeout("art.dialog.close()", 0);
			}else{
				alert(responseText.state);
			}
		}else{
			alert('服务器错误');
		}
	} 

	function showRequest(){
		 return $("form.form-validata").valid();
	}

	//validation验证
	$("form.form-validata").validate({
		errorElement: "span",
        errorClass: "help-inline error",
	})
}); 
</script>
<body>
<div class="container">
	<div class="row">
		<div class="col-xs-12">
			<form id="ajaxForm" action="<{:U('Record/setend')}>" method="post" class="form-horizontal form-validata">
				<div class="form-group">
					<label class="col-xs-2 control-label">会员编号</label>
					<div class="col-xs-4">
						<div class="form-control-static"><{$list['userid']}></div>
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-2 control-label">职位</label>
					<div class="col-xs-4">
						<div class="form-control-static"><{$list['job']}>(<{$list['company']}>)</div>
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-2 control-label">姓名</label>
					<div class="col-xs-4">
						<div class="form-control-static"><{$list['name']}> 手机：<{$list['mobile']}></div>
					</div>
				</div>


				<div class="form-group">
					<label class="col-xs-2 control-label">入职日期</label>
					<div class="col-xs-4">
						<div class="form-control-static"><{$list['startDate']|date="Y-m-d",###}></div>
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-2 control-label">离职日期</label>
					<div class="col-xs-4">
						<input type="text"
		                class="form-control"
						name="endDate"
						id="endDate"
						readonly="readonly" 
						data-rule-required="true"
						/>
						<script> 
						$(function(){
							$("#endDate" ).datepicker();
							$("#endDate" ).datepicker("option", "dateFormat", "yy-mm-dd");

						});
						</script>
					</div>
				</div>
			
				<div class="form-group">
					<div class="col-xs-10 col-xs-offset-2">
						<button type="submit" class="btn btn-info">保存</button>
					</div>
				</div>
				<input type="hidden" name="id" id="id" value="<{$list['id']}>">
				<input type="hidden" name="userid" id="userid" value="<{$list['userid']}>">
				<input type="hidden" name="dosubmit" />
			</form>
		</div>
	</div>
</div>

</body>
</html>
